import { FC } from "react";
import SolutionContent from "./problem/SolutionContent";
import ChoiceContent from "./problem/ChoiceContent";
  

const ProblemContent: FC<any> = ({data})=>{
  var problem = JSON.parse(data.content);
  if (data.type === "solution") {
    return <SolutionContent problem={problem} />;
  }
  else if(data.type === "choice"){
    return <ChoiceContent problem={problem} />;
  }
  else{
    return (<></>)
  }
}

export default ProblemContent;